The chunks that define the characteristics of a sampled sound and that contain the actual sound data are grouped together into a container chunk, known as the Form Chunk. The Form Chunk defines the type and size of the file and holds all remaining chunks in the file. The chunk ID for this container chunk is 'FORM' .
A chunk of type 'FORM' has this structure:
TYPE ContainerChunk =
RECORD
ckID: ID; {'FORM'}
ckSize: LongInt; {number of bytes of data}
formType: ID; {type of file}
END;
For a Form Chunk, the ckSize field contains the size of the data portion of this chunk. Note that the data portion of a Form Chunk is divided into two parts, formType and the rest of the chunks of the file, which follow the formType field. These chunks are called local chunks because their chunk IDs are local to the Form Chunk.
The local chunks can occur in any order in a sound file. As a result, your application should be designed to get a local chunk, identify it, and then process it without making any assumptions about what kind of chunk it is based on its order in the Form Chunk.
The formType field of the Form Chunk specifies the format of the file. For AIFF files, formType is 'AIFF' . For AIFF-C files, formType is 'AIFC' . Note that this type might not be the same as the operating-system type with which the File Manager identifies the file. In particular, a file of operating-system type 'AIFC' might be formatted as an AIFF file.
| Previous | Chapter contents | Chapter top | Section top | Next |